<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/menuAplicacionParametro.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTbltipoprimaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">

            <h:form>
                <p:panel id="panel" styleClass="panelCabeza" header="#{bundle.CreateTbltiponominaTitle}">
                    <p:messages id="msgs"/>
                    <h:panelGrid columns="2">
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_idPrima}" for="idPrima" />
                        <p:inputText id="idPrima" value="#{tbltipoprimaController.selected.idPrima}" title="#{bundle.CreateTbltipoprimaTitle_idPrima}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_idPrima}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_nomPrima}" for="nomPrima" />
                        <p:inputText id="nomPrima" value="#{tbltipoprimaController.selected.nomPrima}" title="#{bundle.CreateTbltipoprimaTitle_nomPrima}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_nomPrima}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_salarioBase}" for="salarioBase" />
                        <h:inputText id="salarioBase" value="#{tbltipoprimaController.selected.salarioBase}" title="#{bundle.CreateTbltipoprimaTitle_salarioBase}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_salarioBase}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_concepto}" for="concepto" />
                        <p:inputText id="concepto" value="#{tbltipoprimaController.selected.concepto}" title="#{bundle.CreateTbltipoprimaTitle_concepto}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_concepto}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_numeroDias}" for="numeroDias" />
                        <p:inputText id="numeroDias" value="#{tbltipoprimaController.selected.numeroDias}" title="#{bundle.CreateTbltipoprimaTitle_numeroDias}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_numeroDias}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_limiteInferior}" for="limiteInferior" />
                        <p:inputText id="limiteInferior" value="#{tbltipoprimaController.selected.limiteInferior}" title="#{bundle.CreateTbltipoprimaTitle_limiteInferior}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_limiteInferior}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_baseLiquidacion}" for="baseLiquidacion" />
                        <p:inputText id="baseLiquidacion" value="#{tbltipoprimaController.selected.baseLiquidacion}" title="#{bundle.CreateTbltipoprimaTitle_baseLiquidacion}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_baseLiquidacion}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_proporcional}" for="proporcional" />
                        <p:inputText id="proporcional" value="#{tbltipoprimaController.selected.proporcional}" title="#{bundle.CreateTbltipoprimaTitle_proporcional}" required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_proporcional}"/>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_codCompania}" for="codCompania" />
                        <p:selectOneMenu id="codCompania" value="#{tbltipoprimaController.selected.codCompania}"  required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_codCompania}">
                            <f:selectItems value="#{tblcompaniaController.itemsAvailableSelectOne}"/>
                        </p:selectOneMenu>
                        <h:outputLabel value="#{bundle.CreateTbltipoprimaLabel_idEstado}" for="idEstado" />
                        <p:selectOneMenu id="idEstado" value="#{tbltipoprimaController.selected.idEstado}"  required="true" requiredMessage="#{bundle.CreateTbltipoprimaRequiredMessage_idEstado}">
                            <f:selectItems value="#{tblEstadoController.itemsAvailableSelectOne}"/>
                        </p:selectOneMenu>
                    </h:panelGrid>

                    <p:commandButton action="#{tbltipoprimaController.create}" update="panel" value="#{bundle.CreateTbltipoprimaSaveLink}" />

                    <p:commandButton action="#{tbltipoprimaController.prepareList}" value="#{bundle.CreateTbltipoprimaShowAllLink}" immediate="true"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
